<!DOCTYPE html>
<html>
<head>
	<title>订单系统</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
</head>
<body>
<script src="bootstrap/js/jquery.min.js"></script>
<script src="bootstrap/js/bootstrap.js"></script>
<{include file='layouts/headNav.html'}>
<div class="container-fluid">
	<div class="row-fluid">
		<div class="span10">
			<!--Body content-->
			<ul class="nav nav-tabs">
				<li class="active"><a href="javascript:void(0)">申请结算</a></li>
			</ul>
			<table class="table table-striped table-bordered table-hover">
				<thead>
					<tr>
						<{foreach from=$_attributes item=attribute}>
						<th><{$attribute}></th>
						<{/foreach}>
					</tr>
				</thead>
			<{if !empty($tpl_datas)}>			
					<{foreach from=$tpl_datas item=data}>
					<tr>
						<{foreach from=$_attributes key=key item=attribute}>
						<td>
							<{if isset($_attributeFormset) && isset($_attributeFormset[$key]) && ($_attributeFormset[$key]['type']|strtolower == 'dropdownlist' || $_attributeFormset[$key]['type']|strtolower == 'radio')}>
							<{$_attributeFormset[$key]['options'][$data[$key]]}>
							<{else}>
							<{$data[$key]}>
							<{/if}>
						</td>
						<{/foreach}>
					</tr>
					<{/foreach}>
					<tr><td colspan='<{count($_attributes)}>'>计算公式：结算利润(<font class="mmx mf"><{($alllirun)}></font>) = 代收款(<font class="mmx"><{($daishoukuan)}></font>) - 商品进货价(<font class="mmx"><{($pifaprice)}></font>) - 邮费(<font class="mmx"><{($youfei)}></font>) - 5%代收款手续费(<font class="mmx"><{($alldaishoufei)}></font>) - 快递服务费(<font class="mmx"><{($kdfuwufei)}></font>) - 快递单费(<font class="mmx"><{($kuaididanfei)}></font>) - 包装费(<font class="mmx"><{($baozhuangfei)}></font>) - 转账手续费(<font class="mmx"><{($zhuanzhangfei)}></font>) - 短信费(<font class="mmx"><{($duanxinfei)}></font>)</td></tr>
					<tr><td colspan='<{count($_attributes)}>' text-align="right">可结算金额：<font class="mmx mf"><{($alllirun)}></font></td></tr>
					<tr><td colspan='<{count($_attributes)}>' text-align="right">
						<form method="post" action="<{spUrl c=$_controller a=apply}>">
							备注：<textarea name="orders[contents]" rows='6' style="width:300px"></textarea>
							<input type="submit" value="申请结算"">
						</form>
					</td></tr>				
			<{else}>
				<tr><td colspan=15>暂无记录！</td></tr>
			<{/if}>
			
			</table>
			
			<{if !empty($tpl_pager)}>
			<div class="rows">
				<div class="span6">
					<div class="pagination pagination-right">
						<ul>
							<li><a href="<{spUrl c=$_controller a=index page=$tpl_pager['prev_page']}>">«</a></li>
							<{foreach from=$tpl_pager['all_pages'] item=page}>
							<{if $page > 10}>
								<{if $tpl_page > $page}>
								<li class="active"><a href="#<{$tpl_page}>"><{$tpl_page}></a></li>
								<{/if}>
								<{if $tpl_page < $tpl_pager['last_page']}>
								<li><a href="<{spUrl c=$_controller a=index page=$tpl_pager['last_page']}>"><{$tpl_pager['last_page']}></a></li>
								<{/if}>
								<{break}>
							<{/if}>
							<li <{if $page eq $tpl_page}>class="active"<{/if}>><a href="<{spUrl c=$_controller a=index page=$page}>"><{$page}></a></li>
							<{/foreach}>
							<li><a href="<{spUrl c=$_controller a=index page=$tpl_pager['next_page']}>">»</a></li>
						</ul>
					</div>
				</div>
				<div class="span6" style="height:75px; line-height: 68px;">
					<form method="post" action="<{spUrl c=$_controller a=index}>" class="form-search">
						<input name="page" type="text" class="input-mini search-query" value="<{$tpl_page}>">
						<button type="submit" class="btn">Go</button>
					</form>
				</div>
			</div>
			<{/if}><!-- end if of $tpl_datas -->
		</div>
	</div>
</div>
<script>
	(function($){
		$('.deleteConfirm').click(function(){
			if(confirm('您确认删除该条记录吗？该操作不可逆。'))
				return true;
			else
				return false;
		})
	})(jQuery)
	
	function shenqing(){
		location.href = "?c=orders&a=apply";
	}
</script>
</body>
</html>